package com.daotingli.backendprograms.Controller.Login;

import com.daotingli.backendprograms.Service.Login.LoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;



@RestController
public class LoginController {

    @Autowired
    private LoginService loginService;


    @RequestMapping(path = "/login", method = RequestMethod.POST,params = {"username","password","identity"})
    public Map login(@RequestParam("username") String username, @RequestParam("password") String password, @RequestParam("identity") String identity){
        return loginService.login(username, password, identity);
    }
}
